package com.ls.pattern.decorator;

import com.ls.pattern.decorator.enums.MenuEnum;
import com.ls.pattern.decorator.menu.AbstractMenu;

import java.util.EnumSet;
import java.util.Set;

/**
 * 管理员权限装饰器
 *
 * @author 挥之以墨
 */
public class AdminMenuDecorator extends BaseMenuDecorator {

    public AdminMenuDecorator(AbstractMenu abstractMenu) {
        super(abstractMenu);
    }

    @Override
    public Set<MenuEnum> getMenu() {
        Set<MenuEnum> menu = super.getMenu();
        menu.addAll(EnumSet.of(MenuEnum.ZUOYE,
                MenuEnum.TIKU,
                MenuEnum.CHENGZHANGQIANG,
                MenuEnum.SHANGCHENG,
                MenuEnum.GUANLIYUAN));
        return menu;
    }
}
